#!/usr/bin/env escript

main(_) ->
	Result = double([2, 4, 9, 7, 1]),
	io:format("~p", [Result]).

double(L) -> lists:map(fun(E) -> E * 2 end, L).

%We are sending an anonymous method (fun) to map method.
%map calls that method on each element in sequence.
																						